/**
 * 数字枚举
 */
enum Direction {
  Up = 1,
  Left,
  Down,
  Right
}
function fn(dir: Direction) {
  console.log(dir)
}
fn(Direction.Down)
/**
 * 字符串枚举
 */
enum Direction1 {
  Up = 'up',
  Left = 'left',
  Down = 'down',
  Right = 'right'
}
function fn1(dir: Direction1) {
  console.log(dir)
}
fn1(Direction1.Down)
/**
 * 混合枚举
 */
enum Direction2 {
  Up = 'up',
  Down = 'down',
  Right = 1,
  Left
}
function fn3(dir: Direction2) {
  console.log(dir)
}
fn3(Direction2.Right)
